/* gplngn2a.i - GET TRANSLATED TEXT FROM CODE                              */
/* Copyright 1986-2011 QAD Inc., Santa Barbara, CA, USA.                      */
/* All rights reserved worldwide.  This is an unpublished work.            */
/* $Id:: gplngn2a.i 2366 2010-11-10 01:47:19Z zzh                          $: */
/* $Revision: 1.9 $                                                         */
/*V8:ConvertMode=Maintenance                                               */
/* REVISION: 7.4                CREATED: 09/22/93   BY:pcd      *H147*     */
/* REVISION: 9.1          LAST MODIFIED: 04/25/00   BY: *N0CD* Santosh Rao */
/* REVISION: 9.1          LAST MODIFIED: 08/14/00   BY: *N0L1* Mark Brown  */
/* Old ECO marker removed, but no ECO header exists *F0PN*                 */
/* $Revision: 1.9 $    BY: Katie Hilbert  DATE: 04/01/01 ECO: *P008*       */
/******************************************************************************/
/* All patch markers and commented out code have been removed from the source */
/* code below. For all future modifications to this file, any code which is   */
/* no longer required should be deleted and no in-line patch markers should   */
/* be added.  The ECO marker should only be included in the Revision History. */
/******************************************************************************/
/*!
NAME gplngn2a.i - get translated text from code.
*/
/*!
SYNOPSIS

{gplngn2a.i
&file           = <file name>
&field          = <field name>
&code           = <digit as char>
&mnemonic       = <local var>   /* Used to return mnemonic */
&label          = <local var>   /* Used to return label */
}

DESCRIPTION
Language Detail (lngd_det) lookup interface routine. Retrieves translated
mnemonic and full-length description associated with a numeric code.
Numeric codes are used internally to store user choices in databaase fields
and/or program variables.
*/

for first lngd_det
   where lngd_dataset = {&file}        and
         lngd_key1    = {&code}        and
         lngd_key2    <> ""            and
         lngd_key3    =  ""            and
         lngd_key4    =  ""            and
         lngd_field   = {&field}       and
         lngd_lang    = global_user_lang
   no-lock:
end. /* FOR FIRST LNGD_DET */

if available lngd_det then do:
   /* In raw mode this routine maps code to itself */
   if global_lngd_raw then
      assign
         {&mnemonic} = lngd_key1
         {&label}    = {&code}.
   else
      assign
         {&mnemonic} = lngd_key2
         {&label}    = lngd_translation.
end.

/* EOF */
